added samples
[windows-sources.git] / sdk / samples / all in on code / Visual Studio 2008 / MFCCOMClient / mfcactivexctrl.h
blobbacb12dc0cb43ea20c4c82eecfb6a27db5bd6981
1 #pragma once
3 // Machine generated IDispatch wrapper class(es) created by Microsoft Visual C++
5 // NOTE: Do not modify the contents of this file. If this class is regenerated by
6 // Microsoft Visual C++, your modifications will be overwritten.
8 /////////////////////////////////////////////////////////////////////////////
9 // CMFCActiveXCtrl wrapper class
11 class CMFCActiveXCtrl : public CWnd
13 protected:
14 DECLARE_DYNCREATE(CMFCActiveXCtrl)
15 public:
16 CLSID const& GetClsid()
18 static CLSID const clsid
19 = { 0xE389AD6C, 0x4FB6, 0x47AF, { 0xB0, 0x3A, 0xA5, 0xA5, 0xC6, 0xB2, 0xB8, 0x20 } };
20 return clsid;
22 virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle,
23 const RECT& rect, CWnd* pParentWnd, UINT nID,
24 CCreateContext* pContext = NULL)
26 return CreateControl(GetClsid(), lpszWindowName, dwStyle, rect, pParentWnd, nID);
29 BOOL Create(LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd,
30 UINT nID, CFile* pPersist = NULL, BOOL bStorage = FALSE,
31 BSTR bstrLicKey = NULL)
33 return CreateControl(GetClsid(), lpszWindowName, dwStyle, rect, pParentWnd, nID,
34 pPersist, bStorage, bstrLicKey);
37 // Attributes
38 public:
41 // Operations
42 public:
44 // _DMFCActiveX
46 // Functions
49 CString HelloWorld()
51 CString result;
52 InvokeHelper(0x1, DISPATCH_METHOD, VT_BSTR, (void*)&result, NULL);
53 return result;
56 // Properties
59 float GetFloatProperty()
61 float result;
62 GetProperty(0x2, VT_R4, (void*)&result);
63 return result;
65 void SetFloatProperty(float propVal)
67 SetProperty(0x2, VT_R4, propVal);